﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGeLinearEnt3d : OdGeCurve3d
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGeLinearEnt3d(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGeLinearEnt3d_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGeLinearEnt3d obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGeLinearEnt3d()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGeLinearEnt3d(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public bool intersectWith(OdGeLinearEnt3d line, OdGePoint3d intPt, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_intersectWith__SWIG_0(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), OdGePoint3d.getCPtr(intPt), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGeLinearEnt3d line, OdGePoint3d intPt)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_intersectWith__SWIG_1(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), OdGePoint3d.getCPtr(intPt));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGePlanarEnt plane, OdGePoint3d intPnt, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_intersectWith__SWIG_2(this.swigCPtr, OdGePlanarEnt.getCPtr(plane), OdGePoint3d.getCPtr(intPnt), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGePlanarEnt plane, OdGePoint3d intPnt)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_intersectWith__SWIG_3(this.swigCPtr, OdGePlanarEnt.getCPtr(plane), OdGePoint3d.getCPtr(intPnt));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool projIntersectWith(OdGeLinearEnt3d line, OdGeVector3d projDir, OdGePoint3d pntOnThisLine, OdGePoint3d pntOnOtherLine, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_projIntersectWith__SWIG_0(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), OdGeVector3d.getCPtr(projDir), OdGePoint3d.getCPtr(pntOnThisLine), OdGePoint3d.getCPtr(pntOnOtherLine), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool projIntersectWith(OdGeLinearEnt3d line, OdGeVector3d projDir, OdGePoint3d pntOnThisLine, OdGePoint3d pntOnOtherLine)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_projIntersectWith__SWIG_1(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), OdGeVector3d.getCPtr(projDir), OdGePoint3d.getCPtr(pntOnThisLine), OdGePoint3d.getCPtr(pntOnOtherLine));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool overlap(OdGeLinearEnt3d line, OdGeLinearEnt3d overlap, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_overlap__SWIG_0(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), overlap, OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool overlap(OdGeLinearEnt3d line, OdGeLinearEnt3d overlap)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_overlap__SWIG_1(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), overlap);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isOn(OdGePlane plane, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isOn__SWIG_0(this.swigCPtr, OdGePlane.getCPtr(plane), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isOn(OdGePlane plane)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isOn__SWIG_1(this.swigCPtr, OdGePlane.getCPtr(plane));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isParallelTo(OdGeLinearEnt3d line, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isParallelTo__SWIG_0(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isParallelTo(OdGeLinearEnt3d line)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isParallelTo__SWIG_1(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isParallelTo(OdGePlanarEnt plane, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isParallelTo__SWIG_2(this.swigCPtr, OdGePlanarEnt.getCPtr(plane), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isParallelTo(OdGePlanarEnt plane)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isParallelTo__SWIG_3(this.swigCPtr, OdGePlanarEnt.getCPtr(plane));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isPerpendicularTo(OdGeLinearEnt3d line, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isPerpendicularTo__SWIG_0(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isPerpendicularTo(OdGeLinearEnt3d line)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isPerpendicularTo__SWIG_1(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isPerpendicularTo(OdGePlanarEnt plane, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isPerpendicularTo__SWIG_2(this.swigCPtr, OdGePlanarEnt.getCPtr(plane), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isPerpendicularTo(OdGePlanarEnt plane)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isPerpendicularTo__SWIG_3(this.swigCPtr, OdGePlanarEnt.getCPtr(plane));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isColinearTo(OdGeLinearEnt3d line, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isColinearTo__SWIG_0(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isColinearTo(OdGeLinearEnt3d line)
		{
			bool result = GlobalsPINVOKE.OdGeLinearEnt3d_isColinearTo__SWIG_1(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getPerpPlane(OdGePoint3d point, OdGePlane plane)
		{
			GlobalsPINVOKE.OdGeLinearEnt3d_getPerpPlane(this.swigCPtr, OdGePoint3d.getCPtr(point), OdGePlane.getCPtr(plane));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePoint3d pointOnLine()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGeLinearEnt3d_pointOnLine(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d direction()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeLinearEnt3d_direction(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getLine(OdGeLine3d line)
		{
			GlobalsPINVOKE.OdGeLinearEnt3d_getLine(this.swigCPtr, OdGeLine3d.getCPtr(line));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeLinearEnt3d Assign(OdGeLinearEnt3d line)
		{
			OdGeLinearEnt3d result = new OdGeLinearEnt3d(GlobalsPINVOKE.OdGeLinearEnt3d_Assign(this.swigCPtr, OdGeLinearEnt3d.getCPtr(line)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
